package com.ihg.hiex.admin.dao.session;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.ihg.hiex.entity.session.before.delegatework.DelegateCareerGoals;
import com.ihg.hiex.entity.session.before.delegatework.DelegateSelfReflection;
import com.ihg.hiex.entity.session.before.delegatework.DelegateWorkDevelopActivity;
import com.ihg.hiex.entity.session.before.delegatework.DelegateWorkEducation;
import com.ihg.hiex.entity.session.before.delegatework.DelegateWorkFuturePosition;
import com.ihg.hiex.entity.session.before.delegatework.DelegateWorkLicense;
import com.ihg.hiex.entity.session.before.delegatework.DelegateWrokExperience;
import com.ihg.hiex.entity.session.before.delegatework.DelegateWrokRecord;
import com.ihg.hiex.entity.session.before.delegatework.DelegateWrokTraining;
import com.ihg.hiex.entity.user.Delegate;

/**
 * 
 * @author dan
 *
 */
@Dao("hibernate")
public interface CareerWorkDao {
    
    /**
     * 
     * @param delegate
     * @return
     */
    @Query("FROM DelegateWrokRecord WHERE disabled = false AND delegate =:delegate ORDER BY sort ASC")
    public List<DelegateWrokRecord> listWorkRecord(@Variable("delegate") Delegate delegate);
    
    /**
     * 
     * @param delegate
     * @return
     */
    @Query("FROM DelegateWrokExperience WHERE disabled = false AND delegate =:delegate")
    public DelegateWrokExperience loadWorkExperience(@Variable("delegate") Delegate delegate);
    
    /**
     * 
     * @param delegate
     * @return
     */
    @Query("FROM DelegateWrokTraining WHERE disabled = false AND delegate =:delegate")
    public List<DelegateWrokTraining> listWorkTraining(@Variable("delegate") Delegate delegate);
    
    /**
     * 
     * @param delegate
     * @return
     */
    @Query("FROM DelegateWorkEducation WHERE disabled = false AND delegate = :delegate")
    public List<DelegateWorkEducation> listEducation(@Variable("delegate") Delegate delegate);
    
    /**
     * 
     * @param delegate
     * @return
     */
    @Query("FROM DelegateWorkLicense WHERE disabled = false AND delegate = :delegate")
    public List<DelegateWorkLicense> listLicense(@Variable("delegate") Delegate delegate);
    
    /**
     * 
     * @param delegate
     * @return
     */
    @Query("FROM DelegateCareerGoals WHERE disabled = false AND delegate =:delegate")
    public DelegateCareerGoals loadCareerGoals(@Variable("delegate") Delegate delegate);
    
    /**
     * 
     * @param delegate
     * @return
     */
    @Query("FROM DelegateSelfReflection WHERE disabled = false AND delegate =:delegate")
    public DelegateSelfReflection loadSelfReflection(@Variable("delegate") Delegate delegate);
    
    /**
     * 
     * @param delegate
     * @return
     */
    @Query("FROM DelegateWorkFuturePosition WHERE disabled = false AND delegate = :delegate")
    public List<DelegateWorkFuturePosition> listPosition(@Variable("delegate") Delegate delegate);
    
    /**
     * 
     * @param delegate
     * @return
     */
    @Query("FROM DelegateWorkDevelopActivity WHERE disabled = false AND delegate = :delegate")
    public List<DelegateWorkDevelopActivity> listActivity(@Variable("delegate") Delegate delegate);

}
